import request from '@/utils/request'

export default {
  /**
   * 获取借款人列表
   * @param page
   * @param limit
   * @param keyword
   * @returns {AxiosPromise}
   */
  getBorrowerList(page,limit,keyword) {
    return request({
      url: `/admin/core/borrower/list/${page}/${limit}`,
      method: 'get',
      params: {keyword}
    })
  },

  /**
   * 获取借款人详细信息
   * @param id
   * @returns {AxiosPromise}
   */
  showBorrowerDetail(id) {
    return request({
      url: `/admin/core/borrower/show/${id}`,
      method: 'get',
    })
  },

  /**
   * 借款审批
   * @param borrowerApproval
   * @returns {AxiosPromise}
   */
  approval(borrowerApproval) {
    return request({
      url: '/admin/core/borrower/approval',
      method: 'post',
      data: borrowerApproval
    })
  }

}
